
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Rectangle)
{
	TEST(should be able to calculate Perimeter)
	{
		Rectangle rectangle(2,3);
		ASSERT_EQ(10, rectangle.calcPerimeter());
	}

	TEST(should be able to calculate Area)
	{
		Rectangle rectangle(2,7);
		ASSERT_EQ(14, rectangle.calcArea());
	}
      
        TEST(should be able to get the length:)
        {
		Rectangle rectangle(2,4);
                ASSERT_EQ(2, rectangle.getLength());
        }
  
        TEST(should be able to get the width:)
        {
                Rectangle rectangle(2,5);
                ASSERT_EQ(5, rectangle.getWidth());
        }
        
        TEST(should be able to set the length:from 2 to 3)
        {
                Rectangle rectangle(2,4);
                ASSERT_EQ(2, rectangle.getLength());
                rectangle.setLength(3);
                ASSERT_EQ(3, rectangle.getLength());
        }

        TEST(should be able to get the width: from 5 to 6)
        {
                Rectangle rectangle(4,5);
                ASSERT_EQ(5, rectangle.getWidth());
                rectangle.setWidth(6);
                ASSERT_EQ(6, rectangle.getWidth());
        }


};
